home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / vim_src.zip / CMDTAB.H < prev    next >
Text File  |  1993-01-12  |  6KB  |  194 lines

  1. /* vi:ts=4
  2.  *
  3.  * VIM - Vi IMitation
  4.  *
  5.  * Code Contributions By:    Bram Moolenaar            mool@oce.nl
  6.  *                            Tim Thompson            twitch!tjt
  7.  *                            Tony Andrews            onecom!wldrdg!tony 
  8.  *                            G. R. (Fred) Walter        watmath!watcgl!grwalter 
  9.  */
  10.  
  11. /*
  12.  * THIS FILE IS AUTOMATICALLY PRODUCED - DO NOT EDIT
  13.  */
  14.  
  15. #define RANGE    0x01            /* allow a linespecs */
  16. #define BANG    0x02            /* allow a ! after the command name */
  17. #define EXTRA    0x04            /* allow extra args after command name */
  18. #define XFILE    0x08            /* expand wildcards in extra part */
  19. #define NOSPC    0x10            /* no spaces allowed in the extra part */
  20. #define    DFLALL    0x20            /* default file range is 1,$ */
  21. #define NODFL    0x40            /* do not default to the current file name */
  22. #define NEEDARG    0x80            /* argument required */
  23. #define TRLBAR    0x100            /* check for trailing vertical bar */
  24. #define REGSTR    0x200            /* allow "x for register designation */
  25. #define COUNT    0x400            /* allow count in argument */
  26. #define NOTRLCOM 0x800            /* no trailing comment allowed */
  27. #define ZEROR    0x1000            /* zero line number allowed */
  28. #define FILES    (XFILE + EXTRA)    /* multiple extra files allowed */
  29. #define WORD1    (EXTRA + NOSPC)    /* one extra word allowed */
  30. #define FILE1    (FILES + NOSPC)    /* 1 file allowed, defaults to current file */
  31. #define NAMEDF    (FILE1 + NODFL)    /* 1 file allowed, defaults to "" */
  32. #define NAMEDFS    (FILES + NODFL)    /* multiple files allowed, default is "" */
  33.  
  34. /*
  35.  * This array maps ex command names to command codes. The order in which
  36.  * command names are listed below is significant -- ambiguous abbreviations
  37.  * are always resolved to be the first possible match (e.g. "r" is taken
  38.  * to mean "read", not "rewind", because "read" comes before "rewind").
  39.  * Not supported commands are included to avoid ambiguities.
  40.  */
  41. static struct
  42. {
  43.     char    *cmd_name;    /* name of the command */
  44.     short     cmd_argt;    /* command line arguments permitted/needed/used */
  45. } cmdnames[] =
  46. {
  47.     {"append",        BANG+RANGE+TRLBAR},            /* not supported */
  48. #define CMD_append 0
  49.     {"abbreviate",    EXTRA+TRLBAR+NOTRLCOM},        /* not supported */
  50. #define CMD_abbreviate 1
  51.     {"args",        TRLBAR},
  52. #define CMD_args 2
  53.     {"change",        BANG+RANGE+COUNT+TRLBAR},    /* not supported */
  54. #define CMD_change 3
  55.     {"cd",            NAMEDF+TRLBAR},
  56. #define CMD_cd 4
  57.     {"cc",            TRLBAR+WORD1+BANG},
  58. #define CMD_cc 5
  59.     {"cf",            TRLBAR+FILE1+BANG},
  60. #define CMD_cf 6
  61.     {"cl",            TRLBAR},
  62. #define CMD_cl 7
  63.     {"cn",            TRLBAR+BANG},
  64. #define CMD_cn 8
  65.     {"cp",            TRLBAR+BANG},
  66. #define CMD_cp 9
  67.     {"cq",            TRLBAR+BANG},
  68. #define CMD_cq 10
  69.     {"copy",        RANGE+EXTRA+TRLBAR},
  70. #define CMD_copy 11
  71.     {"chdir",        NAMEDF+TRLBAR},
  72. #define CMD_chdir 12
  73.     {"delete",        RANGE+REGSTR+COUNT+TRLBAR},
  74. #define CMD_delete 13
  75.     {"display",        TRLBAR},
  76. #define CMD_display 14
  77.     {"digraph",        EXTRA+TRLBAR},
  78. #define CMD_digraph 15
  79.     {"edit",        BANG+FILE1+TRLBAR},
  80. #define CMD_edit 16
  81.     {"ex",            BANG+FILE1+TRLBAR},
  82. #define CMD_ex 17
  83.     {"file",        FILE1+TRLBAR},
  84. #define CMD_file 18
  85.     {"files",        TRLBAR},
  86. #define CMD_files 19
  87.     {"global",        RANGE+BANG+EXTRA+DFLALL},
  88. #define CMD_global 20
  89.     {"help",        TRLBAR},
  90. #define CMD_help 21
  91.     {"insert",        BANG+RANGE+TRLBAR},            /* not supported */
  92. #define CMD_insert 22
  93.     {"join",        RANGE+COUNT+TRLBAR},
  94. #define CMD_join 23
  95.     {"jumps",        TRLBAR},
  96. #define CMD_jumps 24
  97.     {"k",            RANGE+WORD1+TRLBAR},
  98. #define CMD_k 25
  99.     {"list",        RANGE+COUNT+TRLBAR},        /* not supported */
  100. #define CMD_list 26
  101.     {"move",        RANGE+EXTRA+TRLBAR},
  102. #define CMD_move 27
  103.     {"mark",        RANGE+WORD1+TRLBAR},
  104. #define CMD_mark 28
  105.     {"marks",        TRLBAR},
  106. #define CMD_marks 29
  107.     {"map",            BANG+EXTRA+TRLBAR+NOTRLCOM},
  108. #define CMD_map 30
  109.     {"mkexrc",        BANG+FILE1+TRLBAR},
  110. #define CMD_mkexrc 31
  111.     {"next",        RANGE+BANG+NAMEDFS+TRLBAR},
  112. #define CMD_next 32
  113.     {"number",        RANGE+COUNT+TRLBAR},        /* not supported */
  114. #define CMD_number 33
  115.     {"Next",        RANGE+BANG+TRLBAR},
  116. #define CMD_Next 34
  117.     {"print",        RANGE+COUNT+TRLBAR},
  118. #define CMD_print 35
  119.     {"pop",            RANGE+TRLBAR+ZEROR},
  120. #define CMD_pop 36
  121.     {"put",            RANGE+BANG+REGSTR+TRLBAR},
  122. #define CMD_put 37
  123.     {"previous",    RANGE+BANG+TRLBAR},
  124. #define CMD_previous 38
  125.     {"quit",        BANG+TRLBAR},
  126. #define CMD_quit 39
  127.     {"read",        RANGE+NAMEDF+NEEDARG+TRLBAR+ZEROR},
  128. #define CMD_read 40
  129.     {"rewind",        BANG+TRLBAR},
  130. #define CMD_rewind 41
  131.     {"recover",        FILE1+TRLBAR},                /* not supported */
  132. #define CMD_recover 42
  133.     {"substitute",    RANGE+EXTRA},
  134. #define CMD_substitute 43
  135.     {"set",            EXTRA+TRLBAR},
  136. #define CMD_set 44
  137.     {"setkeymap",    NAMEDF+TRLBAR},
  138. #define CMD_setkeymap 45
  139.     {"shell",        TRLBAR},
  140. #define CMD_shell 46
  141.     {"source",        NAMEDF+NEEDARG+TRLBAR},
  142. #define CMD_source 47
  143.     {"stop",        TRLBAR+BANG},
  144. #define CMD_stop 48
  145.     {"t",            RANGE+EXTRA+TRLBAR},
  146. #define CMD_t 49
  147.     {"tag",            RANGE+BANG+WORD1+TRLBAR+ZEROR},
  148. #define CMD_tag 50
  149.     {"tags",        TRLBAR},
  150. #define CMD_tags 51
  151.     {"undo",        TRLBAR},
  152. #define CMD_undo 52
  153.     {"unabbreviate", EXTRA+TRLBAR},                /* not supported */
  154. #define CMD_unabbreviate 53
  155.     {"unmap",        BANG+EXTRA+TRLBAR},
  156. #define CMD_unmap 54
  157.     {"vglobal",        RANGE+EXTRA+DFLALL},
  158. #define CMD_vglobal 55
  159.     {"version",        TRLBAR},
  160. #define CMD_version 56
  161.     {"visual",        RANGE+BANG+FILE1+TRLBAR},
  162. #define CMD_visual 57
  163.     {"write",        RANGE+BANG+FILE1+DFLALL+TRLBAR},
  164. #define CMD_write 58
  165.     {"wnext",        RANGE+BANG+FILE1+TRLBAR},
  166. #define CMD_wnext 59
  167.     {"winsize",        EXTRA+NEEDARG+TRLBAR},
  168. #define CMD_winsize 60
  169.     {"wq",            BANG+FILE1+DFLALL+TRLBAR},
  170. #define CMD_wq 61
  171.     {"xit",            BANG+FILE1+DFLALL+TRLBAR},
  172. #define CMD_xit 62
  173.     {"yank",        RANGE+REGSTR+COUNT+TRLBAR},
  174. #define CMD_yank 63
  175.     {"z",            RANGE+COUNT+TRLBAR},        /* not supported */
  176. #define CMD_z 64
  177.     {"@",            RANGE+EXTRA+TRLBAR},
  178. #define CMD_at 65
  179.     {"!",            RANGE+NAMEDFS},
  180. #define CMD_bang 66
  181.     {"<",            RANGE+COUNT+TRLBAR},
  182. #define CMD_lshift 67
  183.     {">",            RANGE+COUNT+TRLBAR},
  184. #define CMD_rshift 68
  185.     {"=",            RANGE+TRLBAR},
  186. #define CMD_equal 69
  187.     {"&",            RANGE+EXTRA},
  188. #define CMD_and 70
  189.     {"~",            RANGE+TRLBAR}                /* not supported */
  190. #define CMD_tilde 71
  191. #define CMD_SIZE 72
  192.  
  193. };
  194.